<template>
  <div class="userfino_box">
    <el-container style="height: 500px; border: 1px solid #eee">
      <el-aside width="200px" style="background-color: #f7f7f7;">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
        >
          <router-link to="account">
            <el-menu-item index="1">
              <img src="../../assets/broker_normal.png" alt="" v-show="$route.path === '/changepassword'">
              <img src="../../assets/broker_selected.png" alt="" v-show="$route.path === '/account'">
              <span slot="title">个人信息</span>
            </el-menu-item>
          </router-link>
          <router-link to="changepassword">
            <el-menu-item index="2">
              <i class="el-icon-setting"></i> <span slot="title">账号中心</span>
            </el-menu-item>
          </router-link>
        </el-menu>
      </el-aside>
      <el-container> <router-view></router-view> </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    const item = {
      date: "2016-05-02",
      name: "王小虎",

      address: "上海市普陀区金沙江路 1518 弄"
    };
    return {
      activeName: "first",
      tableData: Array(20).fill(item),
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      }
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
    handleClose(tab, event) {
      console.log(tab, event);
    },
    handleOpen(tab, event) {
      console.log(tab, event);
    }
  }
};
</script>
<style scoped lang="less">
.userfino_box {
  width: 80%;
  margin: auto;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}

.usermanage {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
